home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 5 / CD-ROM Today - The Disc (Issue 5)(November 1994).ISO / mac / Mac shareware / Education / RLaB / toolbox / jordan.r < prev    next >
Encoding:
Text File  |  1994-09-21  |  244 b   |  10 lines  |  [TEXT/ttxt]

  1. //
  2. //JORDAN  JORDAN(N, LAMBDA) is the N-by-N Jordan block with eigenvalue LAMBDA.
  3. //        LAMBDA = 1 is the default.
  4.  
  5. jordan = function(n, lambda)
  6. {
  7.   if(!exist (lambda)) { lambda = 1; }
  8.   return ( lambda*eye(n,n) + diag(ones(n-1,1),1) );
  9. };
  10.